package com.kevinxiaoge.ruoli.config;

import com.kevinxiaoge.ruoli.utils.AES;
import org.jasypt.encryption.StringEncryptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * @author chengyuanyuan
 */
@Configuration
@Component("desencrypt")
public class DesEncrypt implements StringEncryptor {

    private final static String cKey = "1234567890123456";


    @Override
    public String encrypt(String s) {
        return AES.Encrypt(s, cKey);
    }

    @Override
    public String decrypt(String s) {
        return AES.Decrypt(s, cKey);
    }
}
